package com.fary.vo;

import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;

import java.io.UnsupportedEncodingException;
import java.sql.Date;
import java.util.HashMap;

public class Test {
    public static void main(String[] args) throws UnsupportedEncodingException {

        Object a = "1";
        Object b = "1";

        Object c = Date.valueOf("2022-06-13");
        Object d = Date.valueOf("2022-06-13");

        Object e = "2.3";
        Object f = "2.30";

        boolean equals = ObjectUtil.equals(a, b);
        boolean equals1 = ObjectUtil.equals(c, d);
        boolean equals2 = ObjectUtil.equals(e, f);
        double v = Double.parseDouble("1.1e-8");
        boolean equals3 = NumberUtil.sub("1.1e-8", "1.10").doubleValue() == 0;

        String join = StrUtil.join(",", "1");
        System.out.println(HashMap.class.isAssignableFrom(HashMap.class));

        System.out.println(StrUtil.sub("1", 3, 4));


        System.out.println(equals);
        System.out.println(equals1);
        System.out.println(equals2);
        System.out.println(equals3);
        System.out.println(join);

        String s = new String("名字".getBytes("gb18030"), "GBK");
        System.out.println(s);

    }

}
